bitkeeper revision 1.388 (3f283b0cfdRYEH7pRqoQr9Mnt8MHmQ)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Wed, 30 Jul 2003 21:39:24 +0000 (21:39 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Wed, 30 Jul 2003 21:39:24 +0000 (21:39 +0000)
network.c, dev.c:
  Strengthen the memory barriers used for lock-free synchronisation in Xenolinux-Xen network code interface.

xen/net/dev.c
xenolinux-2.4.21-sparse/arch/xeno/drivers/network/network.c

index e9e965c7e954ad8b13178e76fd2d903120602cf8..cd5c80111aa1d3cd9e022e93e408439ff8ebe7d1 100644 (file)
@@ -840,7 +840,7 @@ static void tx_skb_release(struct sk_buff *skb)
      * Checks below must happen after the above response is posted.
      * This avoids a possible race with a guest OS on another CPU.
      */
-    smp_rmb();
+    smp_mb();
 
     if ( (vif->tx_cons == vif->tx_prod) && get_tx_bufs(vif) )
     {
index 9abe713a8a29e3115e0a6f90b297c554978cdcb1..3d126997991745c13a8e995ba1520dfdcc6f0675 100644 (file)
@@ -318,7 +318,7 @@ static int network_start_xmit(struct sk_buff *skb, struct net_device *dev)
     np->stats.tx_packets++;
 
     /* Only notify Xen if there are no outstanding responses. */
-    smp_wmb();
+    smp_mb();
     if ( np->net_idx->tx_resp_prod == i )
         HYPERVISOR_net_update();